<%-- 
    Document   : readCookie
    Created on : 2019-9-5, 8:40:49
    Author     : danny
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
Cookie[] cookies = request.getCookies();
for (Cookie cookie : cookies) {
    if ("key".equals(cookie.getName())) {
        System.out.println(cookie.getValue());
        break;
    }
}
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>
